package com.chaosj.skill.guava.collections

import com.google.common.collect.ArrayTable
import com.google.common.collect.HashBasedTable
import com.google.common.collect.TreeBasedTable

/**
 * @Description:
 * @author: caoyangjie
 * @date: 2019年11月2019/11/27日 11:26
 * @Copyright: © 赢时胜
 */
class GuavaTable {
    static void main(args){
        HashBasedTable<String,String,String> table = HashBasedTable.create()
        table.put("张三","语文","140")
        table.put("张三","数学","148")
        table.put("张三","英语","148")
        table.put("张三","理综","288")
        table.put("李四","语文","138")
        table.put("李四","数学","150")
        table.put("李四","英语","144")
        table.put("李四","理综","292")
        table.put("王五","语文","149")
        table.put("王五","数学","144")
        table.put("王五","英语","139")
        table.put("王五","理综","299")
        table.put("赵六","语文","148")
        table.put("赵六","数学","139")
        table.put("赵六","英语","150")
        table.put("赵六","理综","300")

        println(table.row("张三"))
        println(table.row("赵六"))
        println(table.column("语文"))
    }
}
